<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<title></title>
	<link rel="stylesheet" href="">
</head>
<body>
<script src="https://cdn.bootcss.com/vue/2.5.8/vue.js"></script>
<div id="root">
	<my-component v-on:click.native="doTheThing"></my-component>
</div>
<script>
	//有时候，你可能想在某个组件的根元素上监听一个原生事件。可以使用 .native 修饰 v-on 
	Vue.component('my-component',{
		template : '<span @click="doTheThing">{{message}}</span>',
		data : function(){
			return {message:'nihaoia'};
		},
		methods : {
			doTheThing : function(){
				console.log(this.message);
			}
		}
	});
	var vm = new Vue({
		el : "#root",
		data : {
			message : 'ken',
		},
		methods : {
			doTheThing : function(){
				console.log(this.message);
			}
		}
	})
</script>	
</body>
</html>